Language Interoperability Safe C++

نویسنده

  • Peter-Michael S. Osera
چکیده

Most software systems are created not with a single language but instead with a collection of languages each carefully chosen to solve a particular set of problems within those systems. Typically the facilities for these languages to interoperate are constructed in an ah-hoc fashion and are thus tedious to use, error-prone, and do not preserve the safety properties of the languages involved. I am interested in constructing foundationsbased interoperability boundaries that do not have these problems and thus make language interoperability a viable alternative when building large systems. Previous research into language interoperability developed common runtimes that could support multiple languages, culminating in the development of the .NET framework and the evolution of the Java virtual machine to support multiple languages. However, comparatively less attention has been paid to understanding the semantics of interoperability. This is less important when we consider similar language pairs such as C++ and Java, but it is critical when the languages involved have safety properties that must be preserved even in the presence of interoperability, e.g., a dependently-typed or linearly-typed language. I argue [2] that this distinction is important not just for end-users (i.e., programmers) but also language developers and researchers creating advanced programming languages. When developing a fancy new type system and language, designers must jump through many theoretical and implementation hoops or compromise on their core design in a significant way in order to integrate their ideas into a conventional language. However, I suggest that an alternative, potentially more fruitful approach is to stick with a simple core language but instead put effort into building semantics-preserving interoperability boundaries into other languages. With Vilhelm Sjöberg, I’ve begun to explore semantics-preserving interoperability for dependentlytyped languages [1]. We developed a core calculus modeling interop boundaries between simply-typed and dependently-typed lambda calculi with datatypes. Our goal was to identify what dynamic checks were necessary to preserve the guarantees made by dependently-typed code even while executing simply-typed code. We found several subtleties during this process, for example, the need for special constructs to bind values from one language into the other. We also proved standard progress and preservation for our system, demonstrating that we indeed created safe interop boundaries between the two calculi.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Marco: Safe, Expressive Macros for Any Language

Macros improve expressiveness, concision, abstraction, and language interoperability without changing the programming language itself. They are indispensable for building increasingly prevalent multilingual applications. Unfortunately, existing macro systems are wellencapsulated but unsafe (e.g., the C preprocessor) or are safe but tightlyintegrated with the language implementation (e.g., Schem...

متن کامل

Hospital information systems interoperability in Iran

Introduction: Interoperability is needed when the Hospital Information System (HIS) data should be combined and shared with different systems. This study was aimed to determine the semantic and technical interoperability of hospital information systems of Iran’s health care centers and propose guidelines to create and develop interoperability of these centers. Methods: This descriptive st...

متن کامل

From ML to Ada: Strongly-Typed Language Interoperability via Source Translation

We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, \vanilla" C or Ada; it o ers simple, e cient, type-safe inter-operation between new functional code components and \legacy" third-generationlanguage components. Our translator represents a novel synthesi...

متن کامل

Safe and Principled Language Interoperation

Safety of interoperation of program fragments written in different safe languages may fail when the languages have different systems of computational effects: an exception raised by an ML function may have no valid semantic interpretation in the context of a Safe-C caller. Sandboxing costs performance and still may violate the semantics if effects are not taken into account. We show that effect...

متن کامل

Short Presentation: Combining Garbage Collection and Safe Manual Memory Management

Garbage collection (GC) provides an elegant, convenient, and safe approach to managing memory. For many applications, it is an appropriate technique for all data. For other applications, it works well only for most data. For example, it may complicate data-level interoperability with legacy code or exhibit poor performance with respect to a few critical data types. In other systems, such as emb...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012